package cn.com.yusys.yusp.mobile.web.rest;

import cn.com.yusys.yusp.commons.mapper.QueryModel;
import cn.com.yusys.yusp.commons.web.rest.dto.ResultDto;
import cn.com.yusys.yusp.mobile.service.WcrmCustViewInfoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author zhoukanghui
 * @version 1.0
 * @date 2021/8/6 16:27
 */
@RestController
@RequestMapping("/mobile/custView")
public class WcrmCustViewInfoResource {

    @Resource
    private WcrmCustViewInfoService custViewInfoService;

    /**
     * 客户基本信息查询
     * @param queryModel
     * @return
     */
    @GetMapping("/selectCustBaseInfo")
    public ResultDto<List<Map<String, Object>>> selectCustBaseInfo(QueryModel queryModel) {
        return new ResultDto<>(custViewInfoService.selectCustBaseInfo(queryModel));
    }

    /**
     * 时间轴
     * @param queryModel
     * @return
     */
    @GetMapping("/queryTimeAxs")
    public ResultDto<List<Map<String, Object>>> queryTimeAxs(QueryModel queryModel) {
        return new ResultDto<>(custViewInfoService.queryTimeAxs(queryModel));
    }

    /**
     * 对外投资
     * @param queryModel
     * @return
     */
    @GetMapping("/queryOutInvest")
    public ResultDto<List<Map<String, Object>>> queryOutInvest(QueryModel queryModel) {
        return new ResultDto<>(custViewInfoService.queryOutInvest(queryModel));
    }

    /**
     * 资金流向
     * @param queryModel
     * @return
     */
    @GetMapping("/queryMoneyFlow")
    public ResultDto<Object> queryMoneyFlow(QueryModel queryModel) {
        return new ResultDto<>(custViewInfoService.queryMoneyFlow(queryModel));
    }

    /**
     * 担保关系
     * @param queryModel
     * @return
     */
    @GetMapping("/querygurtInfo")
    public ResultDto<List<Map<String, Object>>> querygurtInfo(QueryModel queryModel) {
        return new ResultDto<>(custViewInfoService.querygurtInfo(queryModel));
    }

    /**
     * 家庭关系
     * @param queryModel
     * @return
     */
    @GetMapping("/queryfamyInfo")
    public ResultDto<List<Map<String, Object>>> queryfamyInfo(QueryModel queryModel) {
        return new ResultDto<>(custViewInfoService.queryfamyInfo(queryModel));
    }

    /**
     * 资产负债
     * @param queryModel
     * @return
     */
    @GetMapping("/queryAstLby")
    public ResultDto<Map<String, Object>> queryAstLby(QueryModel queryModel) {
        return new ResultDto<>(custViewInfoService.queryAstLby(queryModel));
    }

    /**
     * 签约信息
     * @param queryModel
     * @return
     */
    @GetMapping("/querySignInfo")
    public ResultDto<List<Map<String, Object>>> querySignInfo(QueryModel queryModel) {
        return new ResultDto<>(custViewInfoService.querySignInfo(queryModel));
    }

    /**
     * 逾欠信息
     * @param queryModel
     * @return
     */
    @GetMapping("/queryOverOwing")
    public ResultDto<List<Map<String, Object>>> queryOverOwing(QueryModel queryModel) {
        return new ResultDto<>(custViewInfoService.queryOverOwing(queryModel));
    }

    /**
     * 预警信息
     * @param queryModel
     * @return
     */
    @GetMapping("/queryearlyWarn")
    public ResultDto<List<Map<String, Object>>> queryearlyWarn(QueryModel queryModel) {
        return new ResultDto<>(custViewInfoService.queryearlyWarn(queryModel));
    }

    /**
     * 黑名单信息
     * @param queryModel
     * @return
     */
    @GetMapping("/queryblklist")
    public ResultDto<List<Map<String, Object>>> queryblklist(QueryModel queryModel) {
        return new ResultDto<>(custViewInfoService.queryblklist(queryModel));
    }

    /**
     * 客户信息修改
     * @param queryModel
     * @return
     */
    @GetMapping("/saveCustInfo")
    public ResultDto<Integer> saveCustInfo(QueryModel queryModel) {
        return new ResultDto<>(custViewInfoService.saveCustInfo(queryModel));
    }
}
